A. Field of the Invention
This invention relates generally to computer systems, and more particularly to a hardware virtualizer and method for establishing correspondence between virtual resources simulated on a general purpose host computer and real processes executing on the host computer.
B. Description of the Prior Art
The emergence in the early 1960's of I/O processors and the use of multiprogramming to improve resource utilization and overall performance signalled the beginning of multiprocessor multiprogramming configurations, wherein main memory was shared among non-identical processors, and wherein a single processor was shared by several processes that were competing for common resources.
In order to avoid problems relating to system integrity a dual state architecture was adopted. Basically system operation was separated into two distinct modes--privileged/non-privileged. The privileged/non-privileged mode of operation (also known as master/slave, supervisor/problem, or system/user modes) restricted the performance of critical operations to the privileged mode, whereas the bulk of operations which were non-critical were performed in the non-privileged mode. (See Computer Structures: Readings and Examples, by C. Gordon Bell and Allen Newell, Page 597, published in 1971 by McGraw-Hill, Inc.)
Referring to FIG. 1a, there is shown a portion of the conventional dual state architecture. The entire conventional dual state architecture is described in the above-cited Bell and Newell book and another book entitled, Computer Organization and the System/370, by Harry Katzan, Jr., published in 1971 by Van Nostrand Reinhold Company. For the understanding of the instant invention only that portion of the conventional dual state architecture shown in FIGS. 1a-1c need be discussed and considered herein. The bare machine 101 has a basic machine interface 103 which supports the privileged software nucleus 102. A basic machine interface is known in the art as the set of all software visible objects and instructions that are directly supported by the hardware and firmware of a particular system. This combination supports several extended machines 104, 105 etc., although only two are shown for clarity. The extended machines in turn can support several user programs such as 106 and 107.
Note, however, that since conventional systems of this type contain only one basic machine interface 103, they are capable of running only one privileged software nucleus 102 at any given time. Accordingly, since the only software which has complete access to and control of all functional capabilities of the hardware is the privileged software nucleus, several problems arise. Chief among these problems is in the area of program transportability, since non-privileged programs are actually written for the extended machine formed by the privileged software nucleus plus the non-privileged functions of the hardware.
Whereas the bare hardware machine is relatively easy the standardize, the extended machines are very difficult of standardization, because of the relative ease with which a system (including the privileged software nucleus) may be modified since the primitives (i.e. pseudo instructions) of such a system are in part implemented in software. A multiplicity of different extended machines running on a standard bare machine is the result. Therefore, a user desiring to run programs written for one extended machine, foreign to the user's extended machine, must either set aside some time on his extended machine to run the "foreign" software nucleus, or must convert the programs written for the foreign extended machine to his extended machine--a choice which most users do not relish.
Another problem arises because there is only one privileged software nucleus and, therefore, it is impossible to run two versions of the privileged software nucleus at the same time. Continued development and modification of the nucleus is, therefore, very difficult since it becomes necessary to have system programmers work at unusual hours to have the dedicated system at their disposal. Moreover, when system programmers do have the dedicated system at their disposal for debugging or modification purposes, a very light load is imposed on the system which results in inefficient utilization of resources.
Finally the amount of testing and diagnosis that can be performed without interferring with normal production schedules is limited, since diagnostic software must have access to and control of all the functional capabilities of the hardware, and thus, cannot be run simultaneously with the privileged software nucleus.
In order to avoid these problems, it is necessary to construct a virtual machine monitor VMM 122 on FIG. 1b, which can support several copies of the basic machine interface 124 on FIG. 1b rather than the extended machine interface. Then different privileged software nuclei, i.e., operating systems, 112, 113 on FIG. 1b, could be run on each of the additional basic machine interfaces 124 and the problems mentioned in the preceding paragraphs could be eliminated.
A basic machine interface which is not supported directly on a bare machine but is, instead, supported in a manner similar to an extended machine interface, is known as a virtual machine and is shown on FIG. 1b reference numerals 110, 111. (See Meyer, P. A. and Seawright, A Virtual Machine Time-Sharing System, IBM Systems Journal, 9, 3 (1970) pages 199-218, wherein the CP-67 virtual machine is described). Referring to FIG. 1b, there is shown the same bare machine 101 as in FIG. 1a; however, the privileged software now running on the basic machine interface 103 is now a virtual machine monitor (VMM) 122. The virtual machine monitor 122 now supports several copies of the basic machine interface 124. Accordinly a different privileged software nucleus 112, 113 can be run on each copy of the additional basic machine interface 124. Each privileged software nucleus 112, 113 can support its own set of extended machine interfaces 125 and 126 and, accordingly, its own user programs 118, 119 or 120, 121, respectively.
Since a basic machine interface, supported by a VMM, is functionally identical to the basic machine interface of the corresponding real machine, anv privileged software nucleus which runs on the bare machine will run on the virtual machine as well. Moreover, the privileged software nucleus has no way of determining whether it is running on a bare machine or a virtual machine. Accordingly, a virtual machine is, in essence, equivalent to and functionally indistinguishable from its real counterpart.
The VMM does not perform instruction-by-instruction interpretation of these programs, but rather permits them to run directly on the bare machine for a greater part of the time. However, occasionally the VMM will trap certain instructions and execute them interpretively in order to insure the integrity of the system as a whole; after the interpretive phase is completed, control is returned to the executing program. Thus, program execution on a virtual machine is quite similar to program execution on an extended machine, with the majority of the instructions executing directly without software intervention, but with occasional intervention by the controlling software in order to perform a necessary interpretive operation.
It will be noted that the virtual machine monitor VMM 122 of FIG. 1b runs directly on a bare machine. Systems of this type have been referred to as a Type I virtual machine. However, there can be virtual machine monitors which run on extended machines. This type of virtual machine is shown schematically on FIG. 1c and is termed a Type II virtual machine. Referring to FIG. 1c, there is shown the bare machine 101 having a basic machine interface 103 with the privileged software nucleus 151. The privileged software nucleus 151, in turn, supports extended machines 153, 154, having extended machine interfaces 157a, 157b, respectively. Extended machine 153, in turn, supports user program 155, whereas extended machine 154 supports virtual machine 158, which in turn can, support extended machine 161 which can in turn, run a user program 162.